package com.itheima.d1_method;

import java.util.Random;
import java.util.Scanner;

public class Test41 {
    public static void main(String[] args) {
        int[] a = new int[10];
        Random rand = new Random();
//        Scanner sc = new Scanner(System.in);
//        int n = sc.nextInt();
        for (int i = 0; i < a.length; i++) {
            a[i] = rand.nextInt(10)+1;
            for (int f = 0; f < i; f++) {
                if (a[f] == a[i]) {
                    i--;
                  break;
                }
            }

        }


    }


}

